﻿//弹出隐藏层
function ShowDiv(show_div, bg_div) {
	document.getElementById(show_div).style.display = 'block';
	document.getElementById(bg_div).style.display = 'block';
	var bgdiv = document.getElementById(bg_div);
	bgdiv.style.width = document.body.scrollWidth;
	// bgdiv.style.height = $(document).height();
	$("#" + bg_div).height($(document).height());
};
function ShowDivOrder(show_div, bg_div,orderId) {
    $("#table_tbody").append("<div id=\"fade\" class=\"black_overlay\"></div>\n" +
        "<div id=\"MyDiv\" class=\"white_content\">\n" +
        "    <div style=\"text-align: right; cursor: default; height: 40px;\">\n" +
        "        <span style=\"font-size: 16px;\" onclick=\"CloseDiv('MyDiv','fade')\">关闭</span>\n" +
        "    </div>\n" +
        "    <iframe id=\"deta\" src=\"details.jsp\" name=\"right\" frameborder=\"0\" scrolling=\"no\"  width=\"100%\" height=\"525px\"></iframe>\n" +
        "</div>");
    var childFrameObj = document.getElementById("deta");
    childFrameObj.contentWindow.paramFromParent = orderId;
    document.getElementById(show_div).style.display = 'block';
    document.getElementById(bg_div).style.display = 'block';
    var bgdiv = document.getElementById(bg_div);
    bgdiv.style.width = document.body.scrollWidth;
    // bgdiv.style.height = $(document).height();
    $("#" + bg_div).height($(document).height());
};
//关闭弹出层
function CloseDiv(show_div, bg_div) {
	document.getElementById(show_div).style.display = 'none';
	document.getElementById(bg_div).style.display = 'none';
    location.reload();
};